package com.wlc.controller;

import com.wlc.pojo.Person;
import com.wlc.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 王立朝
 * @description 控制器
 * @date 2021-12-14 12:27:30
 */
@RestController
public class PersonController {

    @Resource
    private PersonService personService;

    /**
     * @return
     */
    @GetMapping("/get")
    public List<Person> selectAllPerson(){
        System.out.println("接收到请求");
        List<Person> people = personService.selectAllPerson();
        System.out.println("接收到请求结束");
        return people;
    }
}
